#ifndef LOG_H
#define LOG_H
#include <QtGlobal>
#ifdef QT_DEBUG
    #if !defined(LOG_LEVEL)
        #define LOG_LEVEL 6
    #endif
#else
    #if !defined(LOG_LEVEL)
        #define LOG_LEVEL 3
    #endif
#endif
#define LOG_LEVEL_TRACE      6
#define LOG_LEVEL_DEBUG      5
#define LOG_LEVEL_INFO       4
#define LOG_LEVEL_WARN       3
#define LOG_LEVEL_ERROR      2
#define LOG_LEVEL_FATAL      1
#define LOG_LEVEL_NONE       0



#if (LOG_LEVEL > LOG_LEVEL_NONE)
#define NONE                 "\e[0m"
#define BLACK                "\e[0;30m"
#define L_BLACK              "\e[1;30m"
#define RED                  "\e[4;31m"
#define L_RED                "\e[1;31m"
#define GREEN                "\e[0;32m"
#define L_GREEN              "\e[1;32m"
#define BROWN                "\e[0;33m"
#define YELLOW               "\e[1;33m"
#define BLUE                 "\e[0;34m"
#define L_BLUE               "\e[1;34m"
#define PURPLE               "\e[0;35m"
#define L_PURPLE             "\e[1;35m"
#define CYAN                 "\e[0;36m"
#define L_CYAN               "\e[1;36m"
#define GRAY                 "\e[0;37m"
#define WHITE                "\e[1;37m"

#define BOLD                 "\e[1m"
#define UNDERLINE            "\e[4m"
#define BLINK                "\e[5m"
#define REVERSE              "\e[7m"
#define HIDE                 "\e[8m"
#define CLEAR                "\e[2J"
#define CLRLINE              "\r\e[K" //or "\e[1K\r"
#endif
#endif // LOG_H
